home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / etc / bash_completion.d / ipsec < prev    next >
Encoding:
Text File  |  2010-11-16  |  1.3 KB  |  52 lines

  1. # Linux ipsec(8) completion (for FreeS/WAN)
  2. #
  3. [ $UNAME = Linux ] && have ipsec &&
  4. _ipsec()
  5. {
  6.     local cur
  7.  
  8.     COMPREPLY=()
  9.     _get_comp_words_by_ref cur
  10.  
  11.  
  12.     if [ $COMP_CWORD -eq 1 ]; then
  13.         COMPREPLY=( $( compgen -W 'auto barf eroute klipsdebug look manual \
  14.             pluto ranbits rsasigkey setup showdefaults showhostkey spi spigrp \
  15.             tncfg whack' -- "$cur" ) )
  16.         return 0
  17.     fi
  18.  
  19.     case ${COMP_WORDS[1]} in
  20.         auto)
  21.             COMPREPLY=( $( compgen -W '--asynchronous --up --add --delete \
  22.                 --replace --down --route --unroute \
  23.                 --ready --status --rereadsecrets' \
  24.                 -- "$cur" ) )
  25.             ;;
  26.         manual)
  27.             COMPREPLY=( $( compgen -W '--up --down --route --unroute \
  28.                 --union' -- "$cur" ) )
  29.             ;;
  30.         ranbits)
  31.             COMPREPLY=( $( compgen -W '--quick --continuous --bytes' \
  32.                 -- "$cur" ) )
  33.             ;;
  34.         setup)
  35.             COMPREPLY=( $( compgen -W '--start --stop --restart' -- "$cur" ) )
  36.             ;;
  37.         *)
  38.             ;;
  39.     esac
  40.  
  41.     return 0
  42. } &&
  43. complete -F _ipsec ipsec
  44.  
  45. # Local variables:
  46. # mode: shell-script
  47. # sh-basic-offset: 4
  48. # sh-indent-comment: t
  49. # indent-tabs-mode: nil
  50. # End:
  51. # ex: ts=4 sw=4 et filetype=sh
  52.